unit WGLext;
{ Converted from wglext.h (Microsoft PlatformSDK)}
interface
(*
** Copyright (c) 2007-2010 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*)

(* Function declaration macros - to move into glplatform.h *)

uses
  Winapi.Windows,
  Winapi.OpenGL,
  WGL;

(*************************************************************)

(* Header file version number *)
(* wglext.h last updated 2011/04/13 *)
(* Current version at http://www.opengl.org/registry/ *)
{$DEFINE WGL_WGLEXT_VERSION = 23}

const
{$IFNDEF WGL_ARB_buffer_region}
  WGL_FRONT_COLOR_BUFFER_BIT_ARB = $00000001;
  WGL_BACK_COLOR_BUFFER_BIT_ARB  = $00000002;
  WGL_DEPTH_BUFFER_BIT_ARB       = $00000004;
  WGL_STENCIL_BUFFER_BIT_ARB     = $00000008;
{$ENDIF}

{$IFNDEF WGL_ARB_multisample}
  WGL_SAMPLE_BUFFERS_ARB         = $2041;
  WGL_SAMPLES_ARB                = $2042;
{$ENDIF}

{$IFNDEF WGL_ARB_extensions_string}
{$ENDIF}

{$IFNDEF WGL_ARB_pixel_format}
  WGL_NUMBER_PIXEL_FORMATS_ARB   = $2000;
  WGL_DRAW_TO_WINDOW_ARB         = $2001;
  WGL_DRAW_TO_BITMAP_ARB         = $2002;
  WGL_ACCELERATION_ARB           = $2003;
  WGL_NEED_PALETTE_ARB           = $2004;
  WGL_NEED_SYSTEM_PALETTE_ARB    = $2005;
  WGL_SWAP_LAYER_BUFFERS_ARB     = $2006;
  WGL_SWAP_METHOD_ARB            = $2007;
  WGL_NUMBER_OVERLAYS_ARB        = $2008;
  WGL_NUMBER_UNDERLAYS_ARB       = $2009;
  WGL_TRANSPARENT_ARB            = $200A;
  WGL_TRANSPARENT_RED_VALUE_ARB  = $2037;
  WGL_TRANSPARENT_GREEN_VALUE_ARB = $2038;
  WGL_TRANSPARENT_BLUE_VALUE_ARB = $2039;
  WGL_TRANSPARENT_ALPHA_VALUE_ARB = $203A;
  WGL_TRANSPARENT_INDEX_VALUE_ARB = $203B;
  WGL_SHARE_DEPTH_ARB            = $200C;
  WGL_SHARE_STENCIL_ARB          = $200D;
  WGL_SHARE_ACCUM_ARB            = $200E;
  WGL_SUPPORT_GDI_ARB            = $200F;
  WGL_SUPPORT_OPENGL_ARB         = $2010;
  WGL_DOUBLE_BUFFER_ARB          = $2011;
  WGL_STEREO_ARB                 = $2012;
  WGL_PIXEL_TYPE_ARB             = $2013;
  WGL_COLOR_BITS_ARB             = $2014;
  WGL_RED_BITS_ARB               = $2015;
  WGL_RED_SHIFT_ARB              = $2016;
  WGL_GREEN_BITS_ARB             = $2017;
  WGL_GREEN_SHIFT_ARB            = $2018;
  WGL_BLUE_BITS_ARB              = $2019;
  WGL_BLUE_SHIFT_ARB             = $201A;
  WGL_ALPHA_BITS_ARB             = $201B;
  WGL_ALPHA_SHIFT_ARB            = $201C;
  WGL_ACCUM_BITS_ARB             = $201D;
  WGL_ACCUM_RED_BITS_ARB         = $201E;
  WGL_ACCUM_GREEN_BITS_ARB       = $201F;
  WGL_ACCUM_BLUE_BITS_ARB        = $2020;
  WGL_ACCUM_ALPHA_BITS_ARB       = $2021;
  WGL_DEPTH_BITS_ARB             = $2022;
  WGL_STENCIL_BITS_ARB           = $2023;
  WGL_AUX_BUFFERS_ARB            = $2024;
  WGL_NO_ACCELERATION_ARB        = $2025;
  WGL_GENERIC_ACCELERATION_ARB   = $2026;
  WGL_FULL_ACCELERATION_ARB      = $2027;
  WGL_SWAP_EXCHANGE_ARB          = $2028;
  WGL_SWAP_COPY_ARB              = $2029;
  WGL_SWAP_UNDEFINED_ARB         = $202A;
  WGL_TYPE_RGBA_ARB              = $202B;
  WGL_TYPE_COLORINDEX_ARB        = $202C;
{$ENDIF}

{$IFNDEF WGL_ARB_make_current_read}
  ERROR_INVALID_PIXEL_TYPE_ARB   = $2043;
  ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB = $2054;
{$ENDIF}

{$IFNDEF WGL_ARB_pbuffer}
  WGL_DRAW_TO_PBUFFER_ARB        = $202D;
  WGL_MAX_PBUFFER_PIXELS_ARB     = $202E;
  WGL_MAX_PBUFFER_WIDTH_ARB      = $202F;
  WGL_MAX_PBUFFER_HEIGHT_ARB     = $2030;
  WGL_PBUFFER_LARGEST_ARB        = $2033;
  WGL_PBUFFER_WIDTH_ARB          = $2034;
  WGL_PBUFFER_HEIGHT_ARB         = $2035;
  WGL_PBUFFER_LOST_ARB           = $2036;
{$ENDIF}

{$IFNDEF WGL_ARB_render_texture}
  WGL_BIND_TO_TEXTURE_RGB_ARB    = $2070;
  WGL_BIND_TO_TEXTURE_RGBA_ARB   = $2071;
  WGL_TEXTURE_FORMAT_ARB         = $2072;
  WGL_TEXTURE_TARGET_ARB         = $2073;
  WGL_MIPMAP_TEXTURE_ARB         = $2074;
  WGL_TEXTURE_RGB_ARB            = $2075;
  WGL_TEXTURE_RGBA_ARB           = $2076;
  WGL_NO_TEXTURE_ARB             = $2077;
  WGL_TEXTURE_CUBE_MAP_ARB       = $2078;
  WGL_TEXTURE_1D_ARB             = $2079;
  WGL_TEXTURE_2D_ARB             = $207A;
  WGL_MIPMAP_LEVEL_ARB           = $207B;
  WGL_CUBE_MAP_FACE_ARB          = $207C;
  WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = $207D;
  WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = $207E;
  WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = $207F;
  WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = $2080;
  WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = $2081;
  WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = $2082;
  WGL_FRONT_LEFT_ARB             = $2083;
  WGL_FRONT_RIGHT_ARB            = $2084;
  WGL_BACK_LEFT_ARB              = $2085;
  WGL_BACK_RIGHT_ARB             = $2086;
  WGL_AUX0_ARB                   = $2087;
  WGL_AUX1_ARB                   = $2088;
  WGL_AUX2_ARB                   = $2089;
  WGL_AUX3_ARB                   = $208A;
  WGL_AUX4_ARB                   = $208B;
  WGL_AUX5_ARB                   = $208C;
  WGL_AUX6_ARB                   = $208D;
  WGL_AUX7_ARB                   = $208E;
  WGL_AUX8_ARB                   = $208F;
  WGL_AUX9_ARB                   = $2090;
{$ENDIF}

{$IFNDEF WGL_ARB_pixel_format_float}
  WGL_TYPE_RGBA_FLOAT_ARB        = $21A0;
{$ENDIF}

{$IFNDEF WGL_ARB_framebuffer_sRGB}
  WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB = $20A9;
{$ENDIF}

{$IFNDEF WGL_ARB_create_context}
  WGL_CONTEXT_DEBUG_BIT_ARB      = $00000001;
  WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = $00000002;
  WGL_CONTEXT_MAJOR_VERSION_ARB  = $2091;
  WGL_CONTEXT_MINOR_VERSION_ARB  = $2092;
  WGL_CONTEXT_LAYER_PLANE_ARB    = $2093;
  WGL_CONTEXT_FLAGS_ARB          = $2094;
  ERROR_INVALID_VERSION_ARB      = $2095;
{$ENDIF}

{$IFNDEF WGL_ARB_create_context_profile}
  WGL_CONTEXT_PROFILE_MASK_ARB   = $9126;
  WGL_CONTEXT_CORE_PROFILE_BIT_ARB = $00000001;
  WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = $00000002;
  ERROR_INVALID_PROFILE_ARB      = $2096;
{$ENDIF}

{$IFNDEF WGL_ARB_create_context_robustness}
  WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB = $00000004;
  WGL_LOSE_CONTEXT_ON_RESET_ARB  = $8252;
  WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB = $8256;
  WGL_NO_RESET_NOTIFICATION_ARB  = $8261;
{$ENDIF}

{$IFNDEF WGL_EXT_make_current_read}
  ERROR_INVALID_PIXEL_TYPE_EXT   = $2043;
{$ENDIF}

{$IFNDEF WGL_EXT_pixel_format}
  WGL_NUMBER_PIXEL_FORMATS_EXT   = $2000;
  WGL_DRAW_TO_WINDOW_EXT         = $2001;
  WGL_DRAW_TO_BITMAP_EXT         = $2002;
  WGL_ACCELERATION_EXT           = $2003;
  WGL_NEED_PALETTE_EXT           = $2004;
  WGL_NEED_SYSTEM_PALETTE_EXT    = $2005;
  WGL_SWAP_LAYER_BUFFERS_EXT     = $2006;
  WGL_SWAP_METHOD_EXT            = $2007;
  WGL_NUMBER_OVERLAYS_EXT        = $2008;
  WGL_NUMBER_UNDERLAYS_EXT       = $2009;
  WGL_TRANSPARENT_EXT            = $200A;
  WGL_TRANSPARENT_VALUE_EXT      = $200B;
  WGL_SHARE_DEPTH_EXT            = $200C;
  WGL_SHARE_STENCIL_EXT          = $200D;
  WGL_SHARE_ACCUM_EXT            = $200E;
  WGL_SUPPORT_GDI_EXT            = $200F;
  WGL_SUPPORT_OPENGL_EXT         = $2010;
  WGL_DOUBLE_BUFFER_EXT          = $2011;
  WGL_STEREO_EXT                 = $2012;
  WGL_PIXEL_TYPE_EXT             = $2013;
  WGL_COLOR_BITS_EXT             = $2014;
  WGL_RED_BITS_EXT               = $2015;
  WGL_RED_SHIFT_EXT              = $2016;
  WGL_GREEN_BITS_EXT             = $2017;
  WGL_GREEN_SHIFT_EXT            = $2018;
  WGL_BLUE_BITS_EXT              = $2019;
  WGL_BLUE_SHIFT_EXT             = $201A;
  WGL_ALPHA_BITS_EXT             = $201B;
  WGL_ALPHA_SHIFT_EXT            = $201C;
  WGL_ACCUM_BITS_EXT             = $201D;
  WGL_ACCUM_RED_BITS_EXT         = $201E;
  WGL_ACCUM_GREEN_BITS_EXT       = $201F;
  WGL_ACCUM_BLUE_BITS_EXT        = $2020;
  WGL_ACCUM_ALPHA_BITS_EXT       = $2021;
  WGL_DEPTH_BITS_EXT             = $2022;
  WGL_STENCIL_BITS_EXT           = $2023;
  WGL_AUX_BUFFERS_EXT            = $2024;
  WGL_NO_ACCELERATION_EXT        = $2025;
  WGL_GENERIC_ACCELERATION_EXT   = $2026;
  WGL_FULL_ACCELERATION_EXT      = $2027;
  WGL_SWAP_EXCHANGE_EXT          = $2028;
  WGL_SWAP_COPY_EXT              = $2029;
  WGL_SWAP_UNDEFINED_EXT         = $202A;
  WGL_TYPE_RGBA_EXT              = $202B;
  WGL_TYPE_COLORINDEX_EXT        = $202C;
{$ENDIF}

{$IFNDEF WGL_EXT_pbuffer}
  WGL_DRAW_TO_PBUFFER_EXT        = $202D;
  WGL_MAX_PBUFFER_PIXELS_EXT     = $202E;
  WGL_MAX_PBUFFER_WIDTH_EXT      = $202F;
  WGL_MAX_PBUFFER_HEIGHT_EXT     = $2030;
  WGL_OPTIMAL_PBUFFER_WIDTH_EXT  = $2031;
  WGL_OPTIMAL_PBUFFER_HEIGHT_EXT = $2032;
  WGL_PBUFFER_LARGEST_EXT        = $2033;
  WGL_PBUFFER_WIDTH_EXT          = $2034;
  WGL_PBUFFER_HEIGHT_EXT         = $2035;
{$ENDIF}

{$IFNDEF WGL_EXT_depth_float}
  WGL_DEPTH_FLOAT_EXT            = $2040;
{$ENDIF}

{$IFNDEF WGL_3DFX_multisample}
  WGL_SAMPLE_BUFFERS_3DFX        = $2060;
  WGL_SAMPLES_3DFX               = $2061;
{$ENDIF}

{$IFNDEF WGL_EXT_multisample}
  WGL_SAMPLE_BUFFERS_EXT         = $2041;
  WGL_SAMPLES_EXT                = $2042;
{$ENDIF}

{$IFNDEF WGL_I3D_digital_video_control}
  WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D = $2050;
  WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D = $2051;
  WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D = $2052;
  WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D = $2053;
{$ENDIF}

{$IFNDEF WGL_I3D_gamma}
  WGL_GAMMA_TABLE_SIZE_I3D       = $204E;
  WGL_GAMMA_EXCLUDE_DESKTOP_I3D  = $204F;
{$ENDIF}

{$IFNDEF WGL_I3D_genlock}
  WGL_GENLOCK_SOURCE_MULTIVIEW_I3D = $2044;
  WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D = $2045;
  WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D = $2046;
  WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D = $2047;
  WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D = $2048;
  WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D = $2049;
  WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D = $204A;
  WGL_GENLOCK_SOURCE_EDGE_RISING_I3D = $204B;
  WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D = $204C;
{$ENDIF}

{$IFNDEF WGL_I3D_image_buffer}
  WGL_IMAGE_BUFFER_MIN_ACCESS_I3D = $00000001;
  WGL_IMAGE_BUFFER_LOCK_I3D      = $00000002;
{$ENDIF}

{$IFNDEF WGL_I3D_swap_frame_lock}
{$ENDIF}

{$IFNDEF WGL_NV_render_depth_texture}
  WGL_BIND_TO_TEXTURE_DEPTH_NV   = $20A3;
  WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV = $20A4;
  WGL_DEPTH_TEXTURE_FORMAT_NV    = $20A5;
  WGL_TEXTURE_DEPTH_COMPONENT_NV = $20A6;
  WGL_DEPTH_COMPONENT_NV         = $20A7;
{$ENDIF}

{$IFNDEF WGL_NV_render_texture_rectangle}
  WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV = $20A0;
  WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV = $20A1;
  WGL_TEXTURE_RECTANGLE_NV       = $20A2;
{$ENDIF}

{$IFNDEF WGL_ATI_pixel_format_float}
  WGL_TYPE_RGBA_FLOAT_ATI        = $21A0;
{$ENDIF}

{$IFNDEF WGL_NV_float_buffer}
  WGL_FLOAT_COMPONENTS_NV        = $20B0;
  WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV = $20B1;
  WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV = $20B2;
  WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV = $20B3;
  WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV = $20B4;
  WGL_TEXTURE_FLOAT_R_NV         = $20B5;
  WGL_TEXTURE_FLOAT_RG_NV        = $20B6;
  WGL_TEXTURE_FLOAT_RGB_NV       = $20B7;
  WGL_TEXTURE_FLOAT_RGBA_NV      = $20B8;
{$ENDIF}

{$IFNDEF WGL_3DL_stereo_control}
  WGL_STEREO_EMITTER_ENABLE_3DL  = $2055;
  WGL_STEREO_EMITTER_DISABLE_3DL = $2056;
  WGL_STEREO_POLARITY_NORMAL_3DL = $2057;
  WGL_STEREO_POLARITY_INVERT_3DL = $2058;
{$ENDIF}

{$IFNDEF WGL_EXT_pixel_format_packed_float}
  WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT = $20A8;
{$ENDIF}

{$IFNDEF WGL_EXT_framebuffer_sRGB}
  WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT = $20A9;
{$ENDIF}

{$IFNDEF WGL_NV_present_video}
  WGL_NUM_VIDEO_SLOTS_NV         = $20F0;
{$ENDIF}

{$IFNDEF WGL_NV_video_out}
  WGL_BIND_TO_VIDEO_RGB_NV       = $20C0;
  WGL_BIND_TO_VIDEO_RGBA_NV      = $20C1;
  WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV = $20C2;
  WGL_VIDEO_OUT_COLOR_NV         = $20C3;
  WGL_VIDEO_OUT_ALPHA_NV         = $20C4;
  WGL_VIDEO_OUT_DEPTH_NV         = $20C5;
  WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV = $20C6;
  WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV = $20C7;
  WGL_VIDEO_OUT_FRAME            = $20C8;
  WGL_VIDEO_OUT_FIELD_1          = $20C9;
  WGL_VIDEO_OUT_FIELD_2          = $20CA;
  WGL_VIDEO_OUT_STACKED_FIELDS_1_2 = $20CB;
  WGL_VIDEO_OUT_STACKED_FIELDS_2_1 = $20CC;
{$ENDIF}

{$IFNDEF WGL_NV_swap_group}
{$ENDIF}

{$IFNDEF WGL_NV_gpu_affinity}
  WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV = $20D0;
  WGL_ERROR_MISSING_AFFINITY_MASK_NV = $20D1;
{$ENDIF}

{$IFNDEF WGL_AMD_gpu_association}
  WGL_GPU_VENDOR_AMD             = $1F00;
  WGL_GPU_RENDERER_STRING_AMD    = $1F01;
  WGL_GPU_OPENGL_VERSION_STRING_AMD = $1F02;
  WGL_GPU_FASTEST_TARGET_GPUS_AMD = $21A2;
  WGL_GPU_RAM_AMD                = $21A3;
  WGL_GPU_CLOCK_AMD              = $21A4;
  WGL_GPU_NUM_PIPES_AMD          = $21A5;
  WGL_GPU_NUM_SIMD_AMD           = $21A6;
  WGL_GPU_NUM_RB_AMD             = $21A7;
  WGL_GPU_NUM_SPI_AMD            = $21A8;
{$ENDIF}

{$IFNDEF WGL_NV_video_capture}
  WGL_UNIQUE_ID_NV               = $20CE;
  WGL_NUM_VIDEO_CAPTURE_SLOTS_NV = $20CF;
{$ENDIF}

{$IFNDEF WGL_NV_copy_image}
{$ENDIF}

{$IFNDEF WGL_NV_multisample_coverage}
  WGL_COVERAGE_SAMPLES_NV        = $2042;
  WGL_COLOR_SAMPLES_NV           = $20B9;
{$ENDIF}

{$IFNDEF WGL_EXT_create_context_es2_profile}
  WGL_CONTEXT_ES2_PROFILE_BIT_EXT = $00000004;
{$ENDIF}

{$IFNDEF WGL_NV_DX_interop}
  WGL_ACCESS_READ_ONLY_NV        = $00000000;
  WGL_ACCESS_READ_WRITE_NV       = $00000001;
  WGL_ACCESS_WRITE_DISCARD_NV    = $00000002;
{$ENDIF}

type
(*************************************************************)
{$IFNDEF WGL_ARB_pbuffer}
  HPBUFFERARB = THandle;           PHPBUFFERARB    = ^HPBUFFERARB;
{$ENDIF}
{$IFNDEF WGL_EXT_pbuffer}
  HPBUFFEREXT = THandle;           PHPBUFFEREXT    = ^HPBUFFEREXT;
{$ENDIF}
{$IFNDEF WGL_NV_present_video}
  HVIDEOOUTPUTDEVICENV = THandle;  PHVIDEOOUTPUTDEVICENV = ^HVIDEOOUTPUTDEVICENV;
{$ENDIF}
{$IFNDEF WGL_NV_video_output}
  HPVIDEODEV = THandle;            PHPVIDEODEV     = ^HPVIDEODEV;
{$ENDIF}
{$IFNDEF WGL_NV_gpu_affinity}
  HPGPUNV = THandle;               PHPGPUNV        = ^HPGPUNV;
  HGPUNV = THandle;                PHGPUNV         = ^HGPUNV;
  _GPU_DEVICE = record
    cb: DWORD;
    DeviceName: array[0..32] of char;
    DeviceString: array[0..128] of char;
    Flags: DWORD;
    rcVirtualScreen: TRect;
  end;
  GPU_DEVICE = _GPU_DEVICE;
  TGPU_DEVICE = _GPU_DEVICE;
  PGPU_DEVICE = ^_GPU_DEVICE;
{$ENDIF}
{$IFNDEF WGL_NV_video_capture}
  HVIDEOINPUTDEVICENV = THandle;   PHVIDEOINPUTDEVICENV  = ^HVIDEOINPUTDEVICENV;
{$ENDIF}

{$IFNDEF WGL_ARB_buffer_region}
{$DEFINE WGL_ARB_buffer_region = 1}
  TFNWGLCREATEBUFFERREGIONARBPROC = function (hDC: HDC; iLayerPlane: integer; uType: UINT): THandle; stdcall;
  PFNWGLCREATEBUFFERREGIONARBPROC = ^TFNWGLCREATEBUFFERREGIONARBPROC;
  TFNWGLDELETEBUFFERREGIONARBPROC = procedure (hRegion: THandle); stdcall;
  PFNWGLDELETEBUFFERREGIONARBPROC = ^TFNWGLDELETEBUFFERREGIONARBPROC;
  TFNWGLSAVEBUFFERREGIONARBPROC = function (hRegion: THandle; x: integer; y: integer; width: integer; height: integer): BOOL; stdcall;
  PFNWGLSAVEBUFFERREGIONARBPROC = ^TFNWGLSAVEBUFFERREGIONARBPROC;
  TFNWGLRESTOREBUFFERREGIONARBPROC = function (hRegion: THandle; x: integer; y: integer; width: integer; height: integer; xSrc: integer; ySrc: integer): BOOL; stdcall;
  PFNWGLRESTOREBUFFERREGIONARBPROC = ^TFNWGLRESTOREBUFFERREGIONARBPROC;
{$ENDIF}

{$IFNDEF WGL_ARB_multisample}
{$DEFINE WGL_ARB_multisample = 1}
{$ENDIF}

{$IFNDEF WGL_ARB_extensions_string}
{$DEFINE WGL_ARB_extensions_string = 1}
  TFNWGLGETEXTENSIONSSTRINGARBPROC = function (hdc: HDC): PChar; stdcall;
  PFNWGLGETEXTENSIONSSTRINGARBPROC = ^TFNWGLGETEXTENSIONSSTRINGARBPROC;
{$ENDIF}

{$IFNDEF WGL_ARB_pixel_format}
{$DEFINE WGL_ARB_pixel_format = 1}
  TFNWGLGETPIXELFORMATATTRIBIVARBPROC = function (hdc: HDC; iPixelFormat: integer; iLayerPlane: integer; nAttributes: UINT; const piAttributes: Pint; piValues: Pint): BOOL; stdcall;
  PFNWGLGETPIXELFORMATATTRIBIVARBPROC = ^TFNWGLGETPIXELFORMATATTRIBIVARBPROC;
  TFNWGLGETPIXELFORMATATTRIBFVARBPROC = function (hdc: HDC; iPixelFormat: integer; iLayerPlane: integer; nAttributes: UINT; const piAttributes: Pint; pfValues: PGLfloat): BOOL; stdcall;
  PFNWGLGETPIXELFORMATATTRIBFVARBPROC = ^TFNWGLGETPIXELFORMATATTRIBFVARBPROC;
  TFNWGLCHOOSEPIXELFORMATARBPROC = function (hdc: HDC; const piAttribIList: Pint; const pfAttribFList: PGLfloat; nMaxFormats: UINT; piFormats: Pint; nNumFormats: PUINT): BOOL; stdcall;
  PFNWGLCHOOSEPIXELFORMATARBPROC = ^TFNWGLCHOOSEPIXELFORMATARBPROC;
{$ENDIF}

{$IFNDEF WGL_ARB_make_current_read}
{$DEFINE WGL_ARB_make_current_read = 1}
  TFNWGLMAKECONTEXTCURRENTARBPROC = function (hDrawDC: HDC; hReadDC: HDC; hglrc: HGLRC): BOOL; stdcall;
  PFNWGLMAKECONTEXTCURRENTARBPROC = ^TFNWGLMAKECONTEXTCURRENTARBPROC;
  TFNWGLGETCURRENTREADDCARBPROC = function (): HDC; stdcall;
  PFNWGLGETCURRENTREADDCARBPROC = ^TFNWGLGETCURRENTREADDCARBPROC;
{$ENDIF}

{$IFNDEF WGL_ARB_pbuffer}
{$DEFINE WGL_ARB_pbuffer = 1}
  TFNWGLCREATEPBUFFERARBPROC = function (hDC: HDC; iPixelFormat: integer; iWidth: integer; iHeight: integer; const piAttribList: Pint): HPBUFFERARB; stdcall;
  PFNWGLCREATEPBUFFERARBPROC = ^TFNWGLCREATEPBUFFERARBPROC;
  TFNWGLGETPBUFFERDCARBPROC = function (hPbuffer: HPBUFFERARB): HDC; stdcall;
  PFNWGLGETPBUFFERDCARBPROC = ^TFNWGLGETPBUFFERDCARBPROC;
  TFNWGLRELEASEPBUFFERDCARBPROC = function (hPbuffer: HPBUFFERARB; hDC: HDC): integer; stdcall;
  PFNWGLRELEASEPBUFFERDCARBPROC = ^TFNWGLRELEASEPBUFFERDCARBPROC;
  TFNWGLDESTROYPBUFFERARBPROC = function (hPbuffer: HPBUFFERARB): BOOL; stdcall;
  PFNWGLDESTROYPBUFFERARBPROC = ^TFNWGLDESTROYPBUFFERARBPROC;
  TFNWGLQUERYPBUFFERARBPROC = function (hPbuffer: HPBUFFERARB; iAttribute: integer; piValue: Pint): BOOL; stdcall;
  PFNWGLQUERYPBUFFERARBPROC = ^TFNWGLQUERYPBUFFERARBPROC;
{$ENDIF}

{$IFNDEF WGL_ARB_render_texture}
{$DEFINE WGL_ARB_render_texture = 1}
  TFNWGLBINDTEXIMAGEARBPROC = function (hPbuffer: HPBUFFERARB; iBuffer: integer): BOOL; stdcall;
  PFNWGLBINDTEXIMAGEARBPROC = ^TFNWGLBINDTEXIMAGEARBPROC;
  TFNWGLRELEASETEXIMAGEARBPROC = function (hPbuffer: HPBUFFERARB; iBuffer: integer): BOOL; stdcall;
  PFNWGLRELEASETEXIMAGEARBPROC = ^TFNWGLRELEASETEXIMAGEARBPROC;
  TFNWGLSETPBUFFERATTRIBARBPROC = function (hPbuffer: HPBUFFERARB; const piAttribList: Pint): BOOL; stdcall;
  PFNWGLSETPBUFFERATTRIBARBPROC = ^TFNWGLSETPBUFFERATTRIBARBPROC;
{$ENDIF}

{$IFNDEF WGL_ARB_pixel_format_float}
{$DEFINE WGL_ARB_pixel_format_float = 1}
{$ENDIF}

{$IFNDEF WGL_ARB_framebuffer_sRGB}
{$DEFINE WGL_ARB_framebuffer_sRGB = 1}
{$ENDIF}

{$IFNDEF WGL_ARB_create_context}
{$DEFINE WGL_ARB_create_context = 1}
  TFNWGLCREATECONTEXTATTRIBSARBPROC = function (hDC: HDC; hShareContext: HGLRC; const attribList: Pint): HGLRC; stdcall;
  PFNWGLCREATECONTEXTATTRIBSARBPROC = ^TFNWGLCREATECONTEXTATTRIBSARBPROC;
{$ENDIF}

{$IFNDEF WGL_ARB_create_context_profile}
{$DEFINE WGL_ARB_create_context_profile = 1}
{$ENDIF}

{$IFNDEF WGL_ARB_create_context_robustness}
{$DEFINE WGL_ARB_create_context_robustness = 1}
{$ENDIF}

{$IFNDEF WGL_EXT_display_color_table}
{$DEFINE WGL_EXT_display_color_table = 1}
  TFNWGLCREATEDISPLAYCOLORTABLEEXTPROC = function (id: GLushort): GLboolean; stdcall;
  PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC = ^TFNWGLCREATEDISPLAYCOLORTABLEEXTPROC;
  TFNWGLLOADDISPLAYCOLORTABLEEXTPROC = function (const table: PGLushort; length: GLuint): GLboolean; stdcall;
  PFNWGLLOADDISPLAYCOLORTABLEEXTPROC = ^TFNWGLLOADDISPLAYCOLORTABLEEXTPROC;
  TFNWGLBINDDISPLAYCOLORTABLEEXTPROC = function (id: GLushort): GLboolean; stdcall;
  PFNWGLBINDDISPLAYCOLORTABLEEXTPROC = ^TFNWGLBINDDISPLAYCOLORTABLEEXTPROC;
  TFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC = procedure (id: GLushort); stdcall;
  PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC = ^TFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC;
{$ENDIF}

{$IFNDEF WGL_EXT_extensions_string}
{$DEFINE WGL_EXT_extensions_string = 1}
  TFNWGLGETEXTENSIONSSTRINGEXTPROC = function (): PChar; stdcall;
  PFNWGLGETEXTENSIONSSTRINGEXTPROC = ^TFNWGLGETEXTENSIONSSTRINGEXTPROC;
{$ENDIF}

{$IFNDEF WGL_EXT_make_current_read}
{$DEFINE WGL_EXT_make_current_read = 1}
  TFNWGLMAKECONTEXTCURRENTEXTPROC = function (hDrawDC: HDC; hReadDC: HDC; hglrc: HGLRC): BOOL; stdcall;
  PFNWGLMAKECONTEXTCURRENTEXTPROC = ^TFNWGLMAKECONTEXTCURRENTEXTPROC;
  TFNWGLGETCURRENTREADDCEXTPROC = function (): HDC; stdcall;
  PFNWGLGETCURRENTREADDCEXTPROC = ^TFNWGLGETCURRENTREADDCEXTPROC;
{$ENDIF}

{$IFNDEF WGL_EXT_pbuffer}
{$DEFINE WGL_EXT_pbuffer = 1}
  TFNWGLCREATEPBUFFEREXTPROC = function (hDC: HDC; iPixelFormat: integer; iWidth: integer; iHeight: integer; const piAttribList: Pint): HPBUFFEREXT; stdcall;
  PFNWGLCREATEPBUFFEREXTPROC = ^TFNWGLCREATEPBUFFEREXTPROC;
  TFNWGLGETPBUFFERDCEXTPROC = function (hPbuffer: HPBUFFEREXT): HDC; stdcall;
  PFNWGLGETPBUFFERDCEXTPROC = ^TFNWGLGETPBUFFERDCEXTPROC;
  TFNWGLRELEASEPBUFFERDCEXTPROC = function (hPbuffer: HPBUFFEREXT; hDC: HDC): integer; stdcall;
  PFNWGLRELEASEPBUFFERDCEXTPROC = ^TFNWGLRELEASEPBUFFERDCEXTPROC;
  TFNWGLDESTROYPBUFFEREXTPROC = function (hPbuffer: HPBUFFEREXT): BOOL; stdcall;
  PFNWGLDESTROYPBUFFEREXTPROC = ^TFNWGLDESTROYPBUFFEREXTPROC;
  TFNWGLQUERYPBUFFEREXTPROC = function (hPbuffer: HPBUFFEREXT; iAttribute: integer; piValue: Pint): BOOL; stdcall;
  PFNWGLQUERYPBUFFEREXTPROC = ^TFNWGLQUERYPBUFFEREXTPROC;
{$ENDIF}

{$IFNDEF WGL_EXT_pixel_format}
{$DEFINE WGL_EXT_pixel_format = 1}
  TFNWGLGETPIXELFORMATATTRIBIVEXTPROC = function (hdc: HDC; iPixelFormat: integer; iLayerPlane: integer; nAttributes: UINT; piAttributes: Pint; piValues: Pint): BOOL; stdcall;
  PFNWGLGETPIXELFORMATATTRIBIVEXTPROC = ^TFNWGLGETPIXELFORMATATTRIBIVEXTPROC;
  TFNWGLGETPIXELFORMATATTRIBFVEXTPROC = function (hdc: HDC; iPixelFormat: integer; iLayerPlane: integer; nAttributes: UINT; piAttributes: Pint; pfValues: PGLfloat): BOOL; stdcall;
  PFNWGLGETPIXELFORMATATTRIBFVEXTPROC = ^TFNWGLGETPIXELFORMATATTRIBFVEXTPROC;
  TFNWGLCHOOSEPIXELFORMATEXTPROC = function (hdc: HDC; const piAttribIList: Pint; const pfAttribFList: PGLfloat; nMaxFormats: UINT; piFormats: Pint; nNumFormats: PUINT): BOOL; stdcall;
  PFNWGLCHOOSEPIXELFORMATEXTPROC = ^TFNWGLCHOOSEPIXELFORMATEXTPROC;
{$ENDIF}

{$IFNDEF WGL_EXT_swap_control}
{$DEFINE WGL_EXT_swap_control = 1}
  TFNWGLSWAPINTERVALEXTPROC = function (interval: integer): BOOL; stdcall;
  PFNWGLSWAPINTERVALEXTPROC = ^TFNWGLSWAPINTERVALEXTPROC;
  TFNWGLGETSWAPINTERVALEXTPROC = function (): integer; stdcall;
  PFNWGLGETSWAPINTERVALEXTPROC = ^TFNWGLGETSWAPINTERVALEXTPROC;
{$ENDIF}

{$IFNDEF WGL_EXT_depth_float}
{$DEFINE WGL_EXT_depth_float = 1}
{$ENDIF}

{$IFNDEF WGL_NV_vertex_array_range}
{$DEFINE WGL_NV_vertex_array_range = 1}
  TFNWGLALLOCATEMEMORYNVPROC = procedure (size: GLsizei; readfreq: GLfloat; writefreq: GLfloat; priority: GLfloat); stdcall;
  PFNWGLALLOCATEMEMORYNVPROC = ^TFNWGLALLOCATEMEMORYNVPROC;
  TFNWGLFREEMEMORYNVPROC = procedure (pointer: Pvoid); stdcall;
  PFNWGLFREEMEMORYNVPROC = ^TFNWGLFREEMEMORYNVPROC;
{$ENDIF}

{$IFNDEF WGL_3DFX_multisample}
{$DEFINE WGL_3DFX_multisample = 1}
{$ENDIF}

{$IFNDEF WGL_EXT_multisample}
{$DEFINE WGL_EXT_multisample = 1}
{$ENDIF}

{$IFNDEF WGL_OML_sync_control}
{$DEFINE WGL_OML_sync_control = 1}
  TFNWGLGETSYNCVALUESOMLPROC = function (hdc: HDC; ust: PINT64; msc: PINT64; sbc: PINT64): BOOL; stdcall;
  PFNWGLGETSYNCVALUESOMLPROC = ^TFNWGLGETSYNCVALUESOMLPROC;
  TFNWGLGETMSCRATEOMLPROC = function (hdc: HDC; numerator: PGLint; denominator: PGLint): BOOL; stdcall;
  PFNWGLGETMSCRATEOMLPROC = ^TFNWGLGETMSCRATEOMLPROC;
  TFNWGLSWAPBUFFERSMSCOMLPROC = function (hdc: HDC; target_msc: INT64; divisor: INT64; remainder: INT64): INT64; stdcall;
  PFNWGLSWAPBUFFERSMSCOMLPROC = ^TFNWGLSWAPBUFFERSMSCOMLPROC;
  TFNWGLSWAPLAYERBUFFERSMSCOMLPROC = function (hdc: HDC; fuPlanes: integer; target_msc: INT64; divisor: INT64; remainder: INT64): INT64; stdcall;
  PFNWGLSWAPLAYERBUFFERSMSCOMLPROC = ^TFNWGLSWAPLAYERBUFFERSMSCOMLPROC;
  TFNWGLWAITFORMSCOMLPROC = function (hdc: HDC; target_msc: INT64; divisor: INT64; remainder: INT64; ust: PINT64; msc: PINT64; sbc: PINT64): BOOL; stdcall;
  PFNWGLWAITFORMSCOMLPROC = ^TFNWGLWAITFORMSCOMLPROC;
  TFNWGLWAITFORSBCOMLPROC = function (hdc: HDC; target_sbc: INT64; ust: PINT64; msc: PINT64; sbc: PINT64): BOOL; stdcall;
  PFNWGLWAITFORSBCOMLPROC = ^TFNWGLWAITFORSBCOMLPROC;
{$ENDIF}

{$IFNDEF WGL_I3D_digital_video_control}
{$DEFINE WGL_I3D_digital_video_control = 1}
  TFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC = function (hDC: HDC; iAttribute: integer; piValue: Pint): BOOL; stdcall;
  PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC = ^TFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC;
  TFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC = function (hDC: HDC; iAttribute: integer; const piValue: Pint): BOOL; stdcall;
  PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC = ^TFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC;
{$ENDIF}

{$IFNDEF WGL_I3D_gamma}
{$DEFINE WGL_I3D_gamma = 1}
  TFNWGLGETGAMMATABLEPARAMETERSI3DPROC = function (hDC: HDC; iAttribute: integer; piValue: Pint): BOOL; stdcall;
  PFNWGLGETGAMMATABLEPARAMETERSI3DPROC = ^TFNWGLGETGAMMATABLEPARAMETERSI3DPROC;
  TFNWGLSETGAMMATABLEPARAMETERSI3DPROC = function (hDC: HDC; iAttribute: integer; const piValue: Pint): BOOL; stdcall;
  PFNWGLSETGAMMATABLEPARAMETERSI3DPROC = ^TFNWGLSETGAMMATABLEPARAMETERSI3DPROC;
  TFNWGLGETGAMMATABLEI3DPROC = function (hDC: HDC; iEntries: integer; puRed: PGLushort; puGreen: PGLushort; puBlue: PGLushort): BOOL; stdcall;
  PFNWGLGETGAMMATABLEI3DPROC = ^TFNWGLGETGAMMATABLEI3DPROC;
  TFNWGLSETGAMMATABLEI3DPROC = function (hDC: HDC; iEntries: integer; const puRed: PGLushort; const puGreen: PGLushort; const puBlue: PGLushort): BOOL; stdcall;
  PFNWGLSETGAMMATABLEI3DPROC = ^TFNWGLSETGAMMATABLEI3DPROC;
{$ENDIF}

{$IFNDEF WGL_I3D_genlock}
{$DEFINE WGL_I3D_genlock = 1}
  TFNWGLENABLEGENLOCKI3DPROC = function (hDC: HDC): BOOL; stdcall;
  PFNWGLENABLEGENLOCKI3DPROC = ^TFNWGLENABLEGENLOCKI3DPROC;
  TFNWGLDISABLEGENLOCKI3DPROC = function (hDC: HDC): BOOL; stdcall;
  PFNWGLDISABLEGENLOCKI3DPROC = ^TFNWGLDISABLEGENLOCKI3DPROC;
  TFNWGLISENABLEDGENLOCKI3DPROC = function (hDC: HDC; pFlag: PBOOL): BOOL; stdcall;
  PFNWGLISENABLEDGENLOCKI3DPROC = ^TFNWGLISENABLEDGENLOCKI3DPROC;
  TFNWGLGENLOCKSOURCEI3DPROC = function (hDC: HDC; uSource: UINT): BOOL; stdcall;
  PFNWGLGENLOCKSOURCEI3DPROC = ^TFNWGLGENLOCKSOURCEI3DPROC;
  TFNWGLGETGENLOCKSOURCEI3DPROC = function (hDC: HDC; uSource: PUINT): BOOL; stdcall;
  PFNWGLGETGENLOCKSOURCEI3DPROC = ^TFNWGLGETGENLOCKSOURCEI3DPROC;
  TFNWGLGENLOCKSOURCEEDGEI3DPROC = function (hDC: HDC; uEdge: UINT): BOOL; stdcall;
  PFNWGLGENLOCKSOURCEEDGEI3DPROC = ^TFNWGLGENLOCKSOURCEEDGEI3DPROC;
  TFNWGLGETGENLOCKSOURCEEDGEI3DPROC = function (hDC: HDC; uEdge: PUINT): BOOL; stdcall;
  PFNWGLGETGENLOCKSOURCEEDGEI3DPROC = ^TFNWGLGETGENLOCKSOURCEEDGEI3DPROC;
  TFNWGLGENLOCKSAMPLERATEI3DPROC = function (hDC: HDC; uRate: UINT): BOOL; stdcall;
  PFNWGLGENLOCKSAMPLERATEI3DPROC = ^TFNWGLGENLOCKSAMPLERATEI3DPROC;
  TFNWGLGETGENLOCKSAMPLERATEI3DPROC = function (hDC: HDC; uRate: PUINT): BOOL; stdcall;
  PFNWGLGETGENLOCKSAMPLERATEI3DPROC = ^TFNWGLGETGENLOCKSAMPLERATEI3DPROC;
  TFNWGLGENLOCKSOURCEDELAYI3DPROC = function (hDC: HDC; uDelay: UINT): BOOL; stdcall;
  PFNWGLGENLOCKSOURCEDELAYI3DPROC = ^TFNWGLGENLOCKSOURCEDELAYI3DPROC;
  TFNWGLGETGENLOCKSOURCEDELAYI3DPROC = function (hDC: HDC; uDelay: PUINT): BOOL; stdcall;
  PFNWGLGETGENLOCKSOURCEDELAYI3DPROC = ^TFNWGLGETGENLOCKSOURCEDELAYI3DPROC;
  TFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC = function (hDC: HDC; uMaxLineDelay: PUINT; uMaxPixelDelay: PUINT): BOOL; stdcall;
  PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC = ^TFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC;
{$ENDIF}

{$IFNDEF WGL_I3D_image_buffer}
{$DEFINE WGL_I3D_image_buffer = 1}
  TFNWGLCREATEIMAGEBUFFERI3DPROC = function (hDC: HDC; dwSize: DWORD; uFlags: UINT): Pvoid; stdcall;
  PFNWGLCREATEIMAGEBUFFERI3DPROC = ^TFNWGLCREATEIMAGEBUFFERI3DPROC;
  TFNWGLDESTROYIMAGEBUFFERI3DPROC = function (hDC: HDC; pAddress: Pvoid): BOOL; stdcall;
  PFNWGLDESTROYIMAGEBUFFERI3DPROC = ^TFNWGLDESTROYIMAGEBUFFERI3DPROC;
  TFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC = function (hDC: HDC; const pEvent: PHANDLE; const pAddress: Pvoid; const pSize: PDWORD; count: UINT): BOOL; stdcall;
  PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC = ^TFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC;
  TFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC = function (hDC: HDC; const pAddress: Pvoid; count: UINT): BOOL; stdcall;
  PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC = ^TFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC;
{$ENDIF}

{$IFNDEF WGL_I3D_swap_frame_lock}
{$DEFINE WGL_I3D_swap_frame_lock = 1}
  TFNWGLENABLEFRAMELOCKI3DPROC = function (): BOOL; stdcall;
  PFNWGLENABLEFRAMELOCKI3DPROC = ^TFNWGLENABLEFRAMELOCKI3DPROC;
  TFNWGLDISABLEFRAMELOCKI3DPROC = function (): BOOL; stdcall;
  PFNWGLDISABLEFRAMELOCKI3DPROC = ^TFNWGLDISABLEFRAMELOCKI3DPROC;
  TFNWGLISENABLEDFRAMELOCKI3DPROC = function (pFlag: PBOOL): BOOL; stdcall;
  PFNWGLISENABLEDFRAMELOCKI3DPROC = ^TFNWGLISENABLEDFRAMELOCKI3DPROC;
  TFNWGLQUERYFRAMELOCKMASTERI3DPROC = function (pFlag: PBOOL): BOOL; stdcall;
  PFNWGLQUERYFRAMELOCKMASTERI3DPROC = ^TFNWGLQUERYFRAMELOCKMASTERI3DPROC;
{$ENDIF}

{$IFNDEF WGL_I3D_swap_frame_usage}
{$DEFINE WGL_I3D_swap_frame_usage = 1}
  TFNWGLGETFRAMEUSAGEI3DPROC = function (pUsage: PGLfloat): BOOL; stdcall;
  PFNWGLGETFRAMEUSAGEI3DPROC = ^TFNWGLGETFRAMEUSAGEI3DPROC;
  TFNWGLBEGINFRAMETRACKINGI3DPROC = function (): BOOL; stdcall;
  PFNWGLBEGINFRAMETRACKINGI3DPROC = ^TFNWGLBEGINFRAMETRACKINGI3DPROC;
  TFNWGLENDFRAMETRACKINGI3DPROC = function (): BOOL; stdcall;
  PFNWGLENDFRAMETRACKINGI3DPROC = ^TFNWGLENDFRAMETRACKINGI3DPROC;
  TFNWGLQUERYFRAMETRACKINGI3DPROC = function (pFrameCount: PDWORD; pMissedFrames: PDWORD; pLastMissedUsage: PGLfloat): BOOL; stdcall;
  PFNWGLQUERYFRAMETRACKINGI3DPROC = ^TFNWGLQUERYFRAMETRACKINGI3DPROC;
{$ENDIF}

{$IFNDEF WGL_ATI_pixel_format_float}
{$DEFINE WGL_ATI_pixel_format_float = 1}
{$ENDIF}

{$IFNDEF WGL_NV_float_buffer}
{$DEFINE WGL_NV_float_buffer = 1}
{$ENDIF}

{$IFNDEF WGL_3DL_stereo_control}
{$DEFINE WGL_3DL_stereo_control = 1}
  TFNWGLSETSTEREOEMITTERSTATE3DLPROC = function (hDC: HDC; uState: UINT): BOOL; stdcall;
  PFNWGLSETSTEREOEMITTERSTATE3DLPROC = ^TFNWGLSETSTEREOEMITTERSTATE3DLPROC;
{$ENDIF}

{$IFNDEF WGL_EXT_pixel_format_packed_float}
{$DEFINE WGL_EXT_pixel_format_packed_float = 1}
{$ENDIF}

{$IFNDEF WGL_EXT_framebuffer_sRGB}
{$DEFINE WGL_EXT_framebuffer_sRGB = 1}
{$ENDIF}

{$IFNDEF WGL_NV_present_video}
{$DEFINE WGL_NV_present_video = 1}
  TFNWGLENUMERATEVIDEODEVICESNVPROC = function (hDC: HDC; phDeviceList: PHVIDEOOUTPUTDEVICENV): integer; stdcall;
  PFNWGLENUMERATEVIDEODEVICESNVPROC = ^TFNWGLENUMERATEVIDEODEVICESNVPROC;
  TFNWGLBINDVIDEODEVICENVPROC = function (hDC: HDC; uVideoSlot: cardinal; hVideoDevice: HVIDEOOUTPUTDEVICENV; const piAttribList: Pint): BOOL; stdcall;
  PFNWGLBINDVIDEODEVICENVPROC = ^TFNWGLBINDVIDEODEVICENVPROC;
  TFNWGLQUERYCURRENTCONTEXTNVPROC = function (iAttribute: integer; piValue: Pint): BOOL; stdcall;
  PFNWGLQUERYCURRENTCONTEXTNVPROC = ^TFNWGLQUERYCURRENTCONTEXTNVPROC;
{$ENDIF}

{$IFNDEF WGL_NV_video_output}
{$DEFINE WGL_NV_video_output = 1}
  TFNWGLGETVIDEODEVICENVPROC = function (hDC: HDC; numDevices: integer; hVideoDevice: PHPVIDEODEV): BOOL; stdcall;
  PFNWGLGETVIDEODEVICENVPROC = ^TFNWGLGETVIDEODEVICENVPROC;
  TFNWGLRELEASEVIDEODEVICENVPROC = function (hVideoDevice: HPVIDEODEV): BOOL; stdcall;
  PFNWGLRELEASEVIDEODEVICENVPROC = ^TFNWGLRELEASEVIDEODEVICENVPROC;
  TFNWGLBINDVIDEOIMAGENVPROC = function (hVideoDevice: HPVIDEODEV; hPbuffer: HPBUFFERARB; iVideoBuffer: integer): BOOL; stdcall;
  PFNWGLBINDVIDEOIMAGENVPROC = ^TFNWGLBINDVIDEOIMAGENVPROC;
  TFNWGLRELEASEVIDEOIMAGENVPROC = function (hPbuffer: HPBUFFERARB; iVideoBuffer: integer): BOOL; stdcall;
  PFNWGLRELEASEVIDEOIMAGENVPROC = ^TFNWGLRELEASEVIDEOIMAGENVPROC;
  TFNWGLSENDPBUFFERTOVIDEONVPROC = function (hPbuffer: HPBUFFERARB; iBufferType: integer; pulCounterPbuffer: PCardinal; bBlock: BOOL): BOOL; stdcall;
  PFNWGLSENDPBUFFERTOVIDEONVPROC = ^TFNWGLSENDPBUFFERTOVIDEONVPROC;
  TFNWGLGETVIDEOINFONVPROC = function (hpVideoDevice: HPVIDEODEV; pulCounterOutputPbuffer: PCardinal; pulCounterOutputVideo: PCardinal): BOOL; stdcall;
  PFNWGLGETVIDEOINFONVPROC = ^TFNWGLGETVIDEOINFONVPROC;
{$ENDIF}

{$IFNDEF WGL_NV_swap_group}
{$DEFINE WGL_NV_swap_group = 1}
  TFNWGLJOINSWAPGROUPNVPROC = function (hDC: HDC; group: GLuint): BOOL; stdcall;
  PFNWGLJOINSWAPGROUPNVPROC = ^TFNWGLJOINSWAPGROUPNVPROC;
  TFNWGLBINDSWAPBARRIERNVPROC = function (group: GLuint; barrier: GLuint): BOOL; stdcall;
  PFNWGLBINDSWAPBARRIERNVPROC = ^TFNWGLBINDSWAPBARRIERNVPROC;
  TFNWGLQUERYSWAPGROUPNVPROC = function (hDC: HDC; group: PGLuint; barrier: PGLuint): BOOL; stdcall;
  PFNWGLQUERYSWAPGROUPNVPROC = ^TFNWGLQUERYSWAPGROUPNVPROC;
  TFNWGLQUERYMAXSWAPGROUPSNVPROC = function (hDC: HDC; maxGroups: PGLuint; maxBarriers: PGLuint): BOOL; stdcall;
  PFNWGLQUERYMAXSWAPGROUPSNVPROC = ^TFNWGLQUERYMAXSWAPGROUPSNVPROC;
  TFNWGLQUERYFRAMECOUNTNVPROC = function (hDC: HDC; count: PGLuint): BOOL; stdcall;
  PFNWGLQUERYFRAMECOUNTNVPROC = ^TFNWGLQUERYFRAMECOUNTNVPROC;
  TFNWGLRESETFRAMECOUNTNVPROC = function (hDC: HDC): BOOL; stdcall;
  PFNWGLRESETFRAMECOUNTNVPROC = ^TFNWGLRESETFRAMECOUNTNVPROC;
{$ENDIF}

{$IFNDEF WGL_NV_gpu_affinity}
{$DEFINE WGL_NV_gpu_affinity = 1}
  TFNWGLENUMGPUSNVPROC = function (iGpuIndex: UINT; phGpu: PHGPUNV): BOOL; stdcall;
  PFNWGLENUMGPUSNVPROC = ^TFNWGLENUMGPUSNVPROC;
  TFNWGLENUMGPUDEVICESNVPROC = function (hGpu: HGPUNV; iDeviceIndex: UINT; PGPU_lpGpuDevice: PGPU_DEVICE): BOOL; stdcall;
  PFNWGLENUMGPUDEVICESNVPROC = ^TFNWGLENUMGPUDEVICESNVPROC;
  TFNWGLCREATEAFFINITYDCNVPROC = function (const phGpuList: PHGPUNV): HDC; stdcall;
  PFNWGLCREATEAFFINITYDCNVPROC = ^TFNWGLCREATEAFFINITYDCNVPROC;
  TFNWGLENUMGPUSFROMAFFINITYDCNVPROC = function (hAffinityDC: HDC; iGpuIndex: UINT; hGpu: PHGPUNV): BOOL; stdcall;
  PFNWGLENUMGPUSFROMAFFINITYDCNVPROC = ^TFNWGLENUMGPUSFROMAFFINITYDCNVPROC;
  TFNWGLDELETEDCNVPROC = function (hdc: HDC): BOOL; stdcall;
  PFNWGLDELETEDCNVPROC = ^TFNWGLDELETEDCNVPROC;
{$ENDIF}

{$IFNDEF WGL_AMD_gpu_association}
{$DEFINE WGL_AMD_gpu_association = 1}
  TFNWGLGETGPUIDSAMDPROC = function (maxCount: UINT; ids: PUINT): UINT; stdcall;
  PFNWGLGETGPUIDSAMDPROC = ^TFNWGLGETGPUIDSAMDPROC;
  TFNWGLGETGPUINFOAMDPROC = function (id: UINT; _property: integer; dataType: GLenum; size: UINT; data: Pvoid): integer; stdcall;
  PFNWGLGETGPUINFOAMDPROC = ^TFNWGLGETGPUINFOAMDPROC;
  TFNWGLGETCONTEXTGPUIDAMDPROC = function (hglrc: HGLRC): UINT; stdcall;
  PFNWGLGETCONTEXTGPUIDAMDPROC = ^TFNWGLGETCONTEXTGPUIDAMDPROC;
  TFNWGLCREATEASSOCIATEDCONTEXTAMDPROC = function (id: UINT): HGLRC; stdcall;
  PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC = ^TFNWGLCREATEASSOCIATEDCONTEXTAMDPROC;
  TFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC = function (id: UINT; hShareContext: HGLRC; const attribList: Pint): HGLRC; stdcall;
  PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC = ^TFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC;
  TFNWGLDELETEASSOCIATEDCONTEXTAMDPROC = function (hglrc: HGLRC): BOOL; stdcall;
  PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC = ^TFNWGLDELETEASSOCIATEDCONTEXTAMDPROC;
  TFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC = function (hglrc: HGLRC): BOOL; stdcall;
  PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC = ^TFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC;
  TFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC = function (): HGLRC; stdcall;
  PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC = ^TFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC;
  TFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC = procedure (dstCtx: HGLRC; srcX0: GLint; srcY0: GLint; srcX1: GLint; srcY1: GLint; dstX0: GLint; dstY0: GLint; dstX1: GLint; dstY1: GLint; mask: GLbitfield; filter: GLenum); stdcall;
  PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC = ^TFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC;
{$ENDIF}

{$IFNDEF WGL_NV_video_capture}
{$DEFINE WGL_NV_video_capture = 1}
  TFNWGLBINDVIDEOCAPTUREDEVICENVPROC = function (uVideoSlot: UINT; hDevice: HVIDEOINPUTDEVICENV): BOOL; stdcall;
  PFNWGLBINDVIDEOCAPTUREDEVICENVPROC = ^TFNWGLBINDVIDEOCAPTUREDEVICENVPROC;
  TFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC = function (hDc: HDC; phDeviceList: PHVIDEOINPUTDEVICENV): UINT; stdcall;
  PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC = ^TFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC;
  TFNWGLLOCKVIDEOCAPTUREDEVICENVPROC = function (hDc: HDC; hDevice: HVIDEOINPUTDEVICENV): BOOL; stdcall;
  PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC = ^TFNWGLLOCKVIDEOCAPTUREDEVICENVPROC;
  TFNWGLQUERYVIDEOCAPTUREDEVICENVPROC = function (hDc: HDC; hDevice: HVIDEOINPUTDEVICENV; iAttribute: integer; piValue: Pint): BOOL; stdcall;
  PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC = ^TFNWGLQUERYVIDEOCAPTUREDEVICENVPROC;
  TFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC = function (hDc: HDC; hDevice: HVIDEOINPUTDEVICENV): BOOL; stdcall;
  PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC = ^TFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC;
{$ENDIF}

{$IFNDEF WGL_NV_copy_image}
{$DEFINE WGL_NV_copy_image = 1}
  TFNWGLCOPYIMAGESUBDATANVPROC = function (hSrcRC: HGLRC; srcName: GLuint; srcTarget: GLenum; srcLevel: GLint; srcX: GLint; srcY: GLint; srcZ: GLint; hDstRC: HGLRC; dstName: GLuint; dstTarget: GLenum; dstLevel: GLint; dstX: GLint; dstY: GLint; dstZ: GLint; width: GLsizei; height: GLsizei; depth: GLsizei): BOOL; stdcall;
  PFNWGLCOPYIMAGESUBDATANVPROC = ^TFNWGLCOPYIMAGESUBDATANVPROC;
{$ENDIF}

{$IFNDEF WGL_NV_multisample_coverage}
{$DEFINE WGL_NV_multisample_coverage = 1}
{$ENDIF}

{$IFNDEF WGL_NV_DX_interop}
{$DEFINE WGL_NV_DX_interop = 1}
  TFNWGLDXSETRESOURCESHAREHANDLENVPROC = function (dxObject: Pvoid; shareHandle: THandle): BOOL; stdcall;
  PFNWGLDXSETRESOURCESHAREHANDLENVPROC = ^TFNWGLDXSETRESOURCESHAREHANDLENVPROC;
  TFNWGLDXOPENDEVICENVPROC = function (dxDevice: Pvoid): THandle; stdcall;
  PFNWGLDXOPENDEVICENVPROC = ^TFNWGLDXOPENDEVICENVPROC;
  TFNWGLDXCLOSEDEVICENVPROC = function (hDevice: THandle): BOOL; stdcall;
  PFNWGLDXCLOSEDEVICENVPROC = ^TFNWGLDXCLOSEDEVICENVPROC;
  TFNWGLDXREGISTEROBJECTNVPROC = function (hDevice: THandle; dxObject: Pvoid; name: GLuint; _type: GLenum; access: GLenum): THandle; stdcall;
  PFNWGLDXREGISTEROBJECTNVPROC = ^TFNWGLDXREGISTEROBJECTNVPROC;
  TFNWGLDXUNREGISTEROBJECTNVPROC = function (hDevice: THandle; hObject: THandle): BOOL; stdcall;
  PFNWGLDXUNREGISTEROBJECTNVPROC = ^TFNWGLDXUNREGISTEROBJECTNVPROC;
  TFNWGLDXOBJECTACCESSNVPROC = function (hObject: THandle; access: GLenum): BOOL; stdcall;
  PFNWGLDXOBJECTACCESSNVPROC = ^TFNWGLDXOBJECTACCESSNVPROC;
  TFNWGLDXLOCKOBJECTSNVPROC = function (hDevice: THandle; count: GLint; hObjects: PHANDLE): BOOL; stdcall;
  PFNWGLDXLOCKOBJECTSNVPROC = ^TFNWGLDXLOCKOBJECTSNVPROC;
  TFNWGLDXUNLOCKOBJECTSNVPROC = function (hDevice: THandle; count: GLint; hObjects: PHANDLE): BOOL; stdcall;
  PFNWGLDXUNLOCKOBJECTSNVPROC = ^TFNWGLDXUNLOCKOBJECTSNVPROC;
{$ENDIF}

implementation

end.
